Head and Body elements (Body) (L022)
The Body of the document
The body is where the document is actually presented to the user. This is what you see in your browser (the presentation layer), and it is here that we use the majority of (X)HTML tags and elements. Elements that are commonly associated with the body are Hyperlinks, Images, Lists, Paragraphs, and Tables; but these are just a few. There are more than 100 tags that can be used to mark up a document.
Just as the Head element sits inside of the (X)HTML element, so does the Body element. Directly below the closing Head tag is where you will find the opening Body tag, and within the body tag you place all of the presentation markup. But before looking at all the presentation tags, it is worth taking a look at the Body tag and its attributes.
The Body element holds the content of the web page and therefore may control many properties and events that characterize the page. For example, the Body element is able to govern the basic background, colors, and fonts as well as such events that occur when the page loads or unloads.
The Body tag does not require any attributes, but it will often show several. For example the following body tag determines the background color, the default font color, and a JavaScript load event.
<body bgcolor="#000000" text="#ffffff" onload="imageFadeIn(Destin1);" >
. . .
</body>
Except for the onload event, the above tag would be better designed using style.
<style type="text/css">
body {
background-color:#000000;
font-family:Arial,Verdana,sans-serif;
color:#ffffff;
font-size:10pt;
text-align:justify;
}
</style>